<template>
  <Mask ref="loading">
    <Load />
  </Mask>
</template>

<script setup lang='ts'>
import { ref ,watch,onMounted } from "vue"
import Mask from "../basic/mask.vue";
import Load from "../basic/load.vue";
import { loadMaskStore } from '@/stores/loadMask'

const store = loadMaskStore()
const loading:any = ref(null)

onMounted(() => {
  loading.value
}),

watch(
  () => store.getCur,
  (newValue:boolean, oldValue:boolean,) => {
    if(newValue)loading.value?.showMask();
    else loading.value?.closeMask();
  }
)



</script>

<style lang="scss" scoped></style>
